public class Random50{
    public static void main(String[]args){
        int randomNum=(int) (Math.random()*50)+1;//Random随机生成[0,1)
        System.out.println("随机数："+ randomNum);
    }
}